package com.buss.admin.entity;

import com.buss.common.entity.HxUserActive;
import com.buss.member.entity.GeneralUserEntity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

/**   
 * @Title: Entity
 * @Description: 管理员用户关联表
 * @author zhangdaihao
 * @date 2016-05-11 10:43:57
 * @version V1.0   
 *
 */
@Entity
@Table(name = "hx_admin_user", schema = "")
public class AdminUserEntity implements java.io.Serializable {
	/**id*/
	private String id;
	/**管理员id*/
	private String aid;
	/**会员id*/
	private String uid;
	/**创建时间*/
	private Date cretetime;
	/**更新时间*/
	private Date updatetime;
	/**是否锁定，冻结*/
	private Integer status;
	/**0，有效 1，无效*/
	private Integer isDelete;

	/**
	 * 配置外键关联关系
	 */
	private AdminEntity adminEntity;
	private GeneralUserEntity userEntity;

	@OneToOne(targetEntity = AdminEntity.class, cascade = CascadeType.ALL)
	@JoinColumn(name = "aid")
	public AdminEntity getAdminEntity() {
		return adminEntity;
	}

	public void setAdminEntity(AdminEntity adminEntity) {
		this.adminEntity = adminEntity;
	}

	@OneToOne(targetEntity = GeneralUserEntity.class, cascade = CascadeType.ALL)
	@JoinColumn(name = "uid")
	public GeneralUserEntity getUserEntity() {
		return userEntity;
	}

	public void setUserEntity(GeneralUserEntity userEntity) {
		this.userEntity = userEntity;
	}

	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  id
	 */

	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name ="ID",nullable=false,length=32)
	public String getId(){
		return this.id;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  id
	 */
	public void setId(String id){
		this.id = id;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  管理员id
	 */
	@Column(name ="AID",nullable=true,length=32)
	public String getAid(){
		return this.aid;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  管理员id
	 */
	public void setAid(String aid){
		this.aid = aid;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  会员id
	 */
	@Column(name ="UID",nullable=true,length=32)
	public String getUid(){
		return this.uid;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  会员id
	 */
	public void setUid(String uid){
		this.uid = uid;
	}
	/**
	 *方法: 取得java.util.Date
	 *@return: java.util.Date  创建时间
	 */
	@Column(name ="CRETETIME",nullable=true)
	public Date getCretetime(){
		return this.cretetime;
	}

	/**
	 *方法: 设置java.util.Date
	 *@param: java.util.Date  创建时间
	 */
	public void setCretetime(Date cretetime){
		this.cretetime = cretetime;
	}
	/**
	 *方法: 取得java.util.Date
	 *@return: java.util.Date  更新时间
	 */
	@Column(name ="UPDATETIME",nullable=true)
	public Date getUpdatetime(){
		return this.updatetime;
	}

	/**
	 *方法: 设置java.util.Date
	 *@param: java.util.Date  更新时间
	 */
	public void setUpdatetime(Date updatetime){
		this.updatetime = updatetime;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  是否锁定，冻结
	 */
	@Column(name ="STATUS",nullable=true,precision=10,scale=0)
	public Integer getStatus(){
		return this.status;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  是否锁定，冻结
	 */
	public void setStatus(Integer status){
		this.status = status;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  0，有效 1，无效
	 */
	@Column(name ="IS_DELETE",nullable=true,precision=10,scale=0)
	public Integer getIsDelete(){
		return this.isDelete;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  0，有效 1，无效
	 */
	public void setIsDelete(Integer isDelete){
		this.isDelete = isDelete;
	}

}
